package cn.wolfcode.luowowo.comment.domain;

import lombok.Getter;
import lombok.Setter;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;

import java.io.Serializable;
import java.util.Date;

/**
 * 回答的评论
 */
@Getter
@Setter
@Document("answers_comment")
public class AnswersComment implements Serializable{
    public static final int ANSWERS_COMMENT_TYPE_COMMENT = 0; //普通评论
    public static final int ANSWERS_COMMENT_TYPE = 1; //评论的评论

    @Id
    private String id;                          //id
    private Long answersId;                     //回答id
    private String answerSummary;               //回答的概要

    private Long userId;                        //用户id
    private String username;                    //用户姓名
    private int level;                          //用户等级
    private String headUrl;                     //用户头像

    private Date createTime;                    //创建时间
    private String content;                     //评论内容

    private int type = ANSWERS_COMMENT_TYPE;    //评论类别

    private AnswersComment refComment;          //关联的评论
}
